//import HelloWorld from 'views/HelloWorld'
const constantRouterMap = [{
	path: '',
	name: 'movieList',
	component: () =>
		import('views/movie_list.vue') //电影列表展示
}, {
	path: '/movie_details/:id',
	name: 'movie_details',
	component: () =>
		import('views/movie_details.vue') //电影详情展示
}, {
	path: '/admin',
	name: 'movie',
	component: () => import('views/movie.vue'), //添加电影列表
	children: [{
		path: 'movielist',
		name: 'movielist',
		meta: {
			title: '电影列表'
		},
		component: () =>
			import('views/movielist.vue') //添加电影列表
	},{
		path: 'addmovie',
		name: 'addmovie',
		meta: {
			title: '添加电影'
		},
		component: () =>
			import('views/addmovie.vue') //添加电影列表
	}, {
		path: 'deletemovie',
		name: 'deletemovie',
		meta: {
			title: '删除电影'
		},
		component: () =>
			import('views/deletemovie.vue') //删除电影列表
	},{
		path: 'updatemovie/:id',
		name: 'updatemovie',
		meta: {
			title: '更新电影'
		},
		component: () =>
			import('views/updatemovie.vue') //更新电影列表
	}, ]
}]
export default new VueRouter({
	mode: 'history', // require service support
	scrollBehavior: () => ({
		y: 0
	}),
	routes: constantRouterMap
})